<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>event loop</title>
</head>
<body>
<script>
  setTimeout(()=>{
      console.log('timeout1');
      Promise.resolve().then(data=>{
          console.log('then1')
      })
  },0);
  Promise.resolve().then(data=>{
      console.log('then2')
      setTimeout(()=>{
          console.log('timeout2');
      },0);
  })
  console.log('start');
  // 先取出一个宏任务浏览器的执行环境中执行
  // 再去清空微任务

</script>
</body>
</html>
